<?php
use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;
use yii\helpers\Html;
use common\components\helpers\Fun;
LayerConfirmWidget::widget();
LayerIframeWidget::widget();
?>

<div class="yx-praise-list-box yx-praise-box yx-radius2 zx-min-height">
    <!--/*添加按钮*/-->
    <?= $this->renderFile('@app/views/layouts/toolbar.php'); ?>
    <!--/*搜索*/-->
    <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">
        <?= Html::beginForm(Fun::url(['headmaster/index']), 'post', ['enctype' => 'multipart/form-data']) ?>
        <?= \common\components\helpers\Search::activeInput('text', $form, 'name', ['label'=>'姓名','class' => 'search yx-input-text zx-width150 yx-ml6','style'=>'margin-bottom:10px']); ?>
        <?= \common\components\helpers\Search::activeInput('text', $form, 'tel',['label'=>'电话','class' => 'search yx-input-text zx-width150 yx-ml6','style'=>'margin-bottom:10px']); ?>
        <?= \common\components\helpers\Search::activeInput('text', $form, 'mechanic_name',['label'=>'机构名称','class' => 'search yx-input-text zx-width150 yx-ml6','style'=>'margin-bottom:10px']); ?>
        <?= \common\components\helpers\Search::submitButton('搜索', ['id'=>'search-handle','class'=>"yx-search yx-radius2",'style'=>'margin-bottom:10px']); ?>
        <?php Html::endForm() ?>
    </div>
    <!--/*列表*/-->
    <div class="list-boxs">
        <?php foreach($model as $k=>$v){?>
        <div class=" yx-praise-item yx-praise-item2  yx-radius2">
            <div class="yx-teacher-img-box">
                <img class="yx-teacher-img img-circle <?= $v['sex'] == 1 ?'yx-border1':'yx-border2'?>" src="<?=!empty($v['img'])?$v['img']:'images/admin1.jpg'?> "/>
                <span class="<?= $v['sex'] == 1 ?'yx-teacher-sex-boy':'yx-teacher-sex-girl'?>"></span>
            </div>
            <h3 class="yx-teacher-name"><?=!empty($v['name'])?$v['name']:'缺失'?></h3>
            <h4 class="yx-convert-rate"><?=$v['mechanic_name']?></h4>
            <div class=" yx-admin-list">
                <a data-size="500*500" data-name="修改" href="<?=\common\components\helpers\Fun::url(['headmaster/update', 'id' => $v['id']])?>" class="btn yx-class-about yx-bg82d48c yx-radius2">修改</a>
                <?=$v['deleteHandle']?>
                <div class="clear"></div>
            </div>
        </div>
        <?php }?>
        <div class="clear"></div>
        <div style="text-align: right"><?= common\components\widgets\GoPager::widget(['pagination' => $pages]) ?></div>
    </div>
</div>










